package expertise.titan.datasource.impl;

import org.springframework.stereotype.Component;

import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.TitanTransaction;
import com.thinkaurelius.titan.core.TransactionBuilder;

import expertise.titan.datasource.TitanDataSource;

/**
 * This is the basic implementation of the {@link TitanDataSource} interface. It
 * provides the essential implementation based upon the
 * {@link ExpertiseClientConfigurer} that it inherits from.
 * 
 * @author bdgould
 * 
 */
@Component
public class TitanDataSourceImpl extends ExpertiseClientConfigurer {

    /**
     * {@inheritDoc}
     */
    @Override
    public TitanTransaction newTransaction() {
        return graph.newTransaction();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public TransactionBuilder buildTransaction() {
        return graph.buildTransaction();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public TitanGraph graph() {
        return graph;
    }

}
